//
//  CustomTravTableCell.m
//  YouGoWeGo
//
//  Created by LiuFei on 14/11/20.
//  Copyright (c) 2014年 LiuFei. All rights reserved.
//

#import "CustomTravTableCell.h"

@implementation CustomTravTableCell

- (void)dealloc
{
    [_nameLabel release];
    [_detailLabel release];
    [super dealloc];
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        self.nameLabel = [[UILabel alloc] initWithFrame:CGRectZero];
        [_nameLabel setFont:[UIFont systemFontOfSize:20]];
        [_nameLabel setTextColor:[UIColor cyanColor]];
        [self addSubview:_nameLabel];
        [_nameLabel release];
        
        self.detailLabel = [[UILabel alloc] initWithFrame:CGRectZero];
        [_detailLabel setNumberOfLines:0];
        [self addSubview:_detailLabel];
        [_detailLabel release];
        
        
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    
    [_nameLabel setFrame:CGRectMake(20, 20, self.frame.size.width, 20)];
    
    [_detailLabel setFrame:CGRectMake(20, 40, self.frame.size.width, 100)];
    
}

@end
